package com.swagger.system.rest;

import com.swagger.system.pojo.param.UserParam;
import com.swagger.system.pojo.result.UserResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Api(description = "模块一")
@Controller
@RequestMapping(value = "/api/user")
public class UserRest {

    @ApiOperation(value = "一个测试API", notes = "第一个测试API")
    @ResponseBody
    @RequestMapping(value = "/test", method = {RequestMethod.POST})
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "user", value = "文档对象", required = true, paramType = "body", dataType = "UserParam")
//    })
    public UserResult test(UserParam user){

        UserResult userResult = new UserResult();
        userResult.setMessage("1354684");
        return userResult;
    }
}
